Skip to content

Conversation

@simone-stacks
Copy link
Contributor

Description

Add file and stdin input support to stacks-inspect commands, matching the pattern used in clarity-cli. Commands now accept:

  • - for stdin input
  • File paths
  • Direct values (backward compatible)

Applicable issues

Additional info (benefits, drawbacks, caveats)

  • Using shared helpers between clarity-cli and stacks-inspect (to avoid duplication)

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 0% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.34%. Comparing base (3f30b6a) to head (a457ab8).
⚠️ Report is 12 commits behind head on develop.

Files with missing lines Patch % Lines
contrib/clarity-cli/src/lib.rs 0.00% 27 Missing ⚠️
contrib/stacks-inspect/src/main.rs 0.00% 27 Missing ⚠️
contrib/stacks-inspect/src/lib.rs 0.00% 6 Missing ⚠️

❌ Your project status has failed because the head coverage (57.34%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (3f30b6a) and HEAD (a457ab8). Click for more details.

HEAD has 28 uploads less than BASE
Flag BASE (3f30b6a) HEAD (a457ab8)
69 41
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6776       +/-   ##
============================================
- Coverage    68.72%   57.34%   -11.39%     
============================================
  Files          586      586               
  Lines       362349   362361       +12     
============================================
- Hits        249022   207788    -41234     
- Misses      113327   154573    +41246     
Files with missing lines Coverage Δ
contrib/clarity-cli/src/main.rs 13.30% <ø> (-0.25%) ⬇️
contrib/stacks-inspect/src/lib.rs 4.19% <0.00%> (-0.01%) ⬇️
contrib/clarity-cli/src/lib.rs 50.55% <0.00%> (-26.87%) ⬇️
contrib/stacks-inspect/src/main.rs 0.00% <0.00%> (ø)

... and 317 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f30b6a...a457ab8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@simone-stacks simone-stacks marked this pull request as ready for review January 5, 2026 15:26
@simone-stacks simone-stacks added this pull request to the merge queue Jan 13, 2026
Merged via the queue into stacks-network:develop with commit 6561873 Jan 13, 2026
314 of 317 checks passed
@simone-stacks simone-stacks deleted the feat/file-stdin-stacks-inspect branch January 13, 2026 14:38
@federico-stacks
Copy link
Contributor

@simone-stacks @jacinta-stacks @benjamin-stacks apologies for joining the party a bit late, I’m currently catching up with the latest PRs.

For @simone-stacks, I add a few comments that could serve as food for thought for the next follow-up refactoring PR (and, of course, can be ignored if they don’t align with the current direction):

  • I may be going against the current here, but I would lean toward avoiding shared implementations between clarity-cli and stacks-inspect, even at the cost of duplicating some of the methods introduced by this change. This would allow the two crates to remain independent. A common crate could eventually emerge, but it may not be valuable at this stage.
  • Related to this, the existing DEFAULT_CLI_EPOCH dependency could potentially be replaced with StacksEpochId::latest() from stacks-common. This would provide a single source of truth for the default epoch. This change could also be addressed in a dedicated PR.

@simone-stacks
Copy link
Contributor Author

Hi @federico-stacks , thanks for pointing this out. I think you are correct on this, I will address this in the refactoring PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants